﻿using System;
using System.Windows;
using System.Windows.Resources;
using System.Windows.Media.Imaging;
using System.Reflection;

namespace SBPweb.PhotoGallery.Client.Utils
{
    public class ImageResourceHandler
    {

        public static BitmapImage GetBitmapSource(string imagePath)
        {
            StreamResourceInfo sr = Application.GetResourceStream(new Uri(imagePath, UriKind.Relative));
            BitmapImage bmp = new BitmapImage();
            bmp.SetSource(sr.Stream);
            return bmp;
        }

    }
}
